#include "kompositionbutton.h"

KompositionButton::KompositionButton(QGraphicsObject *parent) : AggregationButton(parent)
{
    QBrush brush;
    brush.setStyle(Qt::SolidPattern);
    brush.setColor(Qt::black);

    this->_decorator.setBrush(brush);
}

KompositionButton::~KompositionButton()
{
    qDebug() << "deleting KompositionButton";
}


DraggedRelation* KompositionButton::draggedRelation()
{
    DraggedRelation *draggedRelation = new DraggedRelation();
    draggedRelation->setStartItem(this->_relationalItem);

    UmlRelation *relation = new UmlRelation(UmlRelation::UmlCompositionRelationType);

    draggedRelation->setRelation(relation);

    return draggedRelation;
}
